package com.ayou.session;

import com.ayou.builder.XmlConfigBuilder;
import com.ayou.session.defaults.DefaultSqlSessionFactory;

/**
 * @description:
 * @author: ayouman
 * @date: 2024/7/2 14:59
 */
public class SqlSessionFactoryBuilder {

    public SqlSessionFactory build() {
        XmlConfigBuilder xmlConfigBuilder = new XmlConfigBuilder();
        Configuration configuration = xmlConfigBuilder.parse();
        DefaultSqlSessionFactory defaultSqlSessionFactory = new DefaultSqlSessionFactory(configuration);
        return defaultSqlSessionFactory;
    }
}
